<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="" autocomplete="off">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2" style="font-size: 20px;font-weight: bold;">直播间</label>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Room.name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="r-name" data-rule="required" class="form-control" name="room[name]" type="text" value="{$room.name|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Room.user_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="r-us" data-rule="required" data-source="chat/user/index" class="form-control selectpage" data-field="nickname" data-params='{"custom[type]":"1"}' name="room[user_id]" type="text" value="{$room.user_id}">-->
            <input id="r-user_id" data-rule="required" data-source="auth/admin/index" class="form-control selectpage" data-field="username" name="room[user_id]" type="text" value="{$room.user_id}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Room.talk_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="r-talk_id" data-rule="required" data-source="chat/user/index" class="form-control selectpage" data-field="name" name="room[talk_id]" type="text" value="{$room.talk_id}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Room.start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="r-start_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="room[start_time]" type="text" value="{$room.start_time|datetime}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Room.end_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="r-end_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="room[end_time]" type="text" value="{$room.end_time|datetime}">
        </div>
    </div>

    <div class="form-group">
        <label for="r-file" class="control-label col-xs-12 col-sm-2">{:__('Room.file')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="r-file" class="form-control" size="50" name="room[file]" type="text" value="{$room.file|htmlentities}" />
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-imagethumb" class="btn btn-danger plupload" data-input-id="r-file" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/webp" data-multiple="true" data-preview-id="p-images" data-multipart={"controller":"{$controller}"}><i class="fa fa-upload"></i>{:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="r-file" data-mimetype="image/*" data-multiple="true" data-multipart="{$controller}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Room.content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="r-content" data-rule="required" class="form-control editor" rows="5" name="room[content]" cols="50">{$room.content|htmlentities}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Room.tag')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="r-tag" data-rule="required" class="form-control" name="room[tag]" type="text" value="{$room.tag|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Room.is_show_ppt')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="isShowPptList" item="vo"}
                <label for="room[is_show_ppt]-{$key}"><input id="room[is_show_ppt]-{$key}" name="room[is_show_ppt]" type="radio" value="{$key}" {in name="key" value="$room.is_show_ppt"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
